Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KYUUBI #6291] Avoid NPE in MySQLErrPacket #6292

Closed
wants to merge 3 commits into from

Conversation

zhaohehuhu
Copy link
Contributor

@zhaohehuhu zhaohehuhu commented Apr 11, 2024

🔍 Description

as title

Issue References 🔗

This pull request fixes #6291

Describe Your Solution 🔧

Add a rule to check if it's null

Types of changes 🔖

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Test Plan 🧪

Behavior Without This Pull Request ⚰️

Behavior With This Pull Request 🎉

Related Unit Tests


Checklist 📝

Be nice. Be informative.

dupen01 and others added 2 commits April 11, 2024 13:42
…ribution built without enabling web ui

# 🔍 Description
Improve message of distribution built without enabling web ui.
## Issue References 🔗

This pull request fixes apache#6283

## Describe Your Solution 🔧

Here is my implement:

<img width="1512" alt="image" src="https://github.com/apache/kyuubi/assets/34719039/fc5e859e-1c92-44a1-8e27-316986c5d9c3">

## Types of changes 🔖

- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Test Plan 🧪

#### Behavior Without This Pull Request ⚰️

#### Behavior With This Pull Request 🎉

#### Related Unit Tests

---

# Checklist 📝

- [ ] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)

**Be nice. Be informative.**

Closes apache#6288 from dupen01/issue-6283.

Closes apache#6288

a5886e2 [dupeng] revise the message of page
bad14a7 [dupeng] improve the message of distribution built without enabling web ui

Authored-by: dupeng <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
@zhaohehuhu
Copy link
Contributor Author

@wForget plz review it. Thanks.

@@ -54,7 +54,8 @@ object MySQLErrPacket {
case kse: KyuubiSQLException if kse.getCause != null =>
// prefer brief nested error message instead of whole stacktrace
apply(kse.getCause)
case e: Exception if e.getMessage contains "NoSuchDatabaseException" =>
case e: Exception
if (e.getMessage != null) && (e.getMessage contains "NoSuchDatabaseException") =>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (e.getMessage != null) && (e.getMessage contains "NoSuchDatabaseException") =>
if e.getMessage != null && e.getMessage.contains("NoSuchDatabaseException") =>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks !

@wForget
Copy link
Member

wForget commented Apr 11, 2024

Please complete the checklist

@pan3793 pan3793 changed the title Avoid NPE in MySQLErrPacket [KYUUBI #6291] Avoid NPE in MySQLErrPacket Apr 11, 2024
@pan3793 pan3793 added this to the v1.7.4 milestone Apr 11, 2024
pan3793 pushed a commit that referenced this pull request Apr 11, 2024
# 🔍 Description
as title
## Issue References 🔗

This pull request fixes #6291

## Describe Your Solution 🔧

Add a rule to check if it's null

## Types of changes 🔖

- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Test Plan 🧪

#### Behavior Without This Pull Request ⚰️

#### Behavior With This Pull Request 🎉

#### Related Unit Tests

---

# Checklist 📝

- [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)

**Be nice. Be informative.**

Closes #6292 from zhaohehuhu/dev-0411.

Closes #6291

a58eed6 [hezhao2] refactor
40ad5e0 [hezhao2] Avoid NPE in MySQLErrPacket
e02be17 [dupeng] [KYUUBI #6288] [KYUUBI  #6283] Improve the message of distribution built without enabling web ui

Lead-authored-by: hezhao2 <[email protected]>
Co-authored-by: dupeng <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
(cherry picked from commit f43cc59)
Signed-off-by: Cheng Pan <[email protected]>
pan3793 pushed a commit that referenced this pull request Apr 11, 2024
# 🔍 Description
as title
## Issue References 🔗

This pull request fixes #6291

## Describe Your Solution 🔧

Add a rule to check if it's null

## Types of changes 🔖

- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Test Plan 🧪

#### Behavior Without This Pull Request ⚰️

#### Behavior With This Pull Request 🎉

#### Related Unit Tests

---

# Checklist 📝

- [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)

**Be nice. Be informative.**

Closes #6292 from zhaohehuhu/dev-0411.

Closes #6291

a58eed6 [hezhao2] refactor
40ad5e0 [hezhao2] Avoid NPE in MySQLErrPacket
e02be17 [dupeng] [KYUUBI #6288] [KYUUBI  #6283] Improve the message of distribution built without enabling web ui

Lead-authored-by: hezhao2 <[email protected]>
Co-authored-by: dupeng <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
(cherry picked from commit f43cc59)
Signed-off-by: Cheng Pan <[email protected]>
pan3793 pushed a commit that referenced this pull request Apr 11, 2024
# 🔍 Description
as title
## Issue References 🔗

This pull request fixes #6291

## Describe Your Solution 🔧

Add a rule to check if it's null

## Types of changes 🔖

- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Test Plan 🧪

#### Behavior Without This Pull Request ⚰️

#### Behavior With This Pull Request 🎉

#### Related Unit Tests

---

# Checklist 📝

- [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)

**Be nice. Be informative.**

Closes #6292 from zhaohehuhu/dev-0411.

Closes #6291

a58eed6 [hezhao2] refactor
40ad5e0 [hezhao2] Avoid NPE in MySQLErrPacket
e02be17 [dupeng] [KYUUBI #6288] [KYUUBI  #6283] Improve the message of distribution built without enabling web ui

Lead-authored-by: hezhao2 <[email protected]>
Co-authored-by: dupeng <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
(cherry picked from commit f43cc59)
Signed-off-by: Cheng Pan <[email protected]>
@pan3793 pan3793 closed this in f43cc59 Apr 11, 2024
@pan3793
Copy link
Member

pan3793 commented Apr 11, 2024

Merged to master(1.10.0)/1.9.1/1.8.2/1.7.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TASK][TRIVIAL] Avoid NPE in MySQLErrPacket
6 participants